<form class="layui-form" lay-filter="lig-saveForm">
    <div class="layui-tab">
        <ul class="layui-tab-title">
            <!--<li class="layui-this">账号信息</li>-->
            <li lig-lang="user-modifyPassword">修改密码</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <div class="layui-form-item">
                    <label class="layui-form-label" lig-lang="user-oldPassword">旧密码</label>
                    <div class="layui-input-block">
                        <input type="password" name="oldPassword" autocomplete="off" class="layui-input" lay-verify="required"
                                value=''>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label" lig-lang="user-newPassword">新密码</label>
                    <div class="layui-input-block">
                        <input type="password" name="newPassword" autocomplete="off" class="layui-input" lay-verify="required"
                                value=''>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label" lig-lang="user-reNewPassword">确认新密码</label>
                    <div class="layui-input-block">
                        <input type="password" name="reNewPassword" autocomplete="off" class="layui-input" lay-verify="required"
                                value=''>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"></label>
                    <div class="layui-input-block">
                        <a class="layui-btn layui-btn-normal" lay-submit lay-filter="lig-save" lig-lang="btn-okUpdate">确认修改</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</form>
<script>
    layui.use(['admin', 'form', 'jquery', 'lig'], function (admin, form, $, lig) {
        form.render();

        form.on('submit(lig-save)', function (data) {
            var field = data.field;
            field.userId = admin.data()['user'].userId;
            lig.ajaxpost({
               url: 'uc/user/password',
               data: field,
               success: function () {
                    lig.success();
               }
            });
            return false;
        });
    });
</script>